// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

Vue.config.productionTip = false

import Axios from 'axios'
Vue.prototype.$ajax = Axios

import qs from 'qs';
Vue.prototype.$qs = qs;

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

// import store from './store'

import Vuex from 'vuex'
Vue.use(Vuex)

var store = new Vuex.Store({
  state: {
    uname: ''
  },
  mutations: {
    addTo(state, username) {
      state.uname=username
    }
  }
})

new Vue({
  el: '#app',
  router,
  store,
  render: c => c(App),
  components: { App }
})
